package com.sk.bilibili.view.diy.bottomDialog;

import android.view.View;

import com.sk.bilibili.R;
import com.sk.bilibili.model.diy.bottomDialog.VideoSetModel;
import com.sk.bilibili.view.activity.DynamicActivity;

public class VideoSetBottomDialog extends BaseHorizontalBottomDialog<VideoSetModel>{

    private Integer videoSetId;

    public VideoSetBottomDialog(Integer videoSetId) {
        this.videoSetId = videoSetId;
    }

    @Override
    protected void afterSetView() {
        title1.setVisibility(View.GONE);
        title2.setVisibility(View.GONE);
    }

    @Override
    protected void initImageAndName() {
        images1=new int[]{R.drawable.share_dynamic,R.drawable.share_msg,R.drawable.share_qq,R.drawable.share_qq_space,R.drawable.share_wx,R.drawable.share_wx_space,R.drawable.share_wb,R.drawable.copy_link,R.drawable.more_share};
        names1="动态,消息,QQ,QQ空间,微信,朋友圈,微博,复制链接,更多".split(",");
        images2=new int[]{R.drawable.later,R.drawable.download,R.drawable.report,R.drawable.dislike};
        names2="稍后再看,缓存,举报,我不喜欢".split(",");
    }

    @Override
    public void onType1Click(int pos) {
        switch (pos){
            case 0:
                DynamicActivity.start(getContext(),0,videoSetId);
                break;
            case 7:
                model.copyUrl(videoSetId);
                toast("已复制到剪切板");
                break;
            case 8:
                model.shareMore(videoSetId);
                break;
            default:
                toast("暂不支持");
                break;
        }
        dismiss();
    }

    @Override
    public void onType2Click(int pos) {
        if (pos == 0) {
            model.addLater(videoSetId);
            toast("以添加到稍后再看");
        } else {
            toast("暂不支持");
        }
        dismiss();
    }

}